import { defineConfig } from "vite";
import Unocss from "unocss/vite";
import presetMini from "@unocss/preset-mini";
import presetIcons from '@unocss/preset-icons'
//
export default defineConfig({
  plugins: [
    Unocss({
      presets: [presetMini(),presetIcons()],
      //
      variants: [
        (matcher) => {
          // 支持 hover-items 样式
          if (!matcher.startsWith("hi:")) return matcher;
          return {
            matcher: matcher.slice(3),
            selector: (s) =>
              `.hover-items:hover ${s.replace(/^(\W)?hi\\?\:/gi, "$1")}`,
          };
        },
      ],
      rules:[
        // ['fs-(.*)',{}]
      ]
    }),
  ],
});
